package Modele;

import java.io.Serializable;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.Date;

@SuppressWarnings("serial")
public class Historique implements Serializable, IHistorique {

	private Date date;
	private URL url;
	private int id;
	private String dateFormater;
	
	public Historique (Date date, URL url){
		this.date = date;
		this.url = url;
		formaterDate(date);
	}
	@Override
	public Date getDate() {
		return date;
	}

	@Override
	public URL getUrl() {
		return url;
	}
	@Override
	public int getId() {
		return id;
	}

	private void formaterDate (Date date){
		SimpleDateFormat formater = new SimpleDateFormat("'le' dd/MM/yyyy 'à' hh:mm:ss");
		dateFormater = formater.format(date);
	}
	public String getDateFormater() {
		return dateFormater;
	}
	public void setDateFormater(String dateFormater) {
		this.dateFormater = dateFormater;
	}
}
